package com.group9.handinhand.dao;

import java.io.Serializable;
import java.util.List;
/**
 * Interface class for base dao.
 *
 */
public interface BaseDao {

	public <T> List<T> findAll(Class<T> entityClass);
	
	public <T> Object findById(Class<T> entityClass, Serializable id);
	
	public Serializable save(Object object);
	
	public void update(Object object);

	public <T>  T findEntityByPropertyUnique(Class<T> entityClass, String propertyName, Object value);

	public <T>  T findEntityByPropertyUnique(Class<T> cls, String[] properties,	Object[] values);

	public void delete(Object instance);

	public <T> List<T> findEntityByProperty(Class<T> entityClass, String property, Object value);

	public <T> List<T> findEntityByPropertyOrderBy(Class<T> entityClass, String property,Object value);

	public <T> List<T> executeQueryString(String queryString, String property, Object value);

	public <T> List<T> executeQueryString(String queryString, String[] properties, Object[] values);

	public <T> T executeQueryStringForObject(String queryString, String[] properties, Object[] values);

	public void merge(Object instance);
}
